package com.atguigu.registration.order.service;

import com.atguigu.registration.model.order.OrderInfo;
import com.atguigu.registration.model.order.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @Author: Jiang Yizhi
 * @Date: 2022/5/13 9:03 PM
 */
public interface PaymentService extends IService<PaymentInfo> {

    /** 向支付记录表添加信息 */
    void savePaymentInfo(OrderInfo order, Integer status);

    /** 更新订单状态 */
    void paySuccess(String out_trade_no, Map<String, String> resultMap);

    /**
     * 获取支付记录
     * @param orderId
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfo(Long orderId, Integer paymentType);

}
